package run_service;

import communicate_interface.ServerInterface;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.logging.Level;
import java.util.logging.Logger;
import server.Server;

public class RunServer {
            
    public static void main(String [] args){
        Server obj = new Server();
        try {
            
            ServerInterface sint = (ServerInterface) UnicastRemoteObject.exportObject(obj, 0);
            Registry r = LocateRegistry.getRegistry();
            r.rebind("Server", sint);
            System.out.println("running..");
            
        } catch (RemoteException ex) {
            Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
